<form id="consult_form" action="__SELF__" method="post" class="form-horizontal">
    <div class="form-group">
        <label class="col-xs-2 control-label">类别</label>
        <div class="col-xs-10">
            <volist name="consult_category_list" id="vl">
                <label class="radio-inline"><input type="radio" name="type_id" value="{$vl.id}" checked="">{$vl.title}</label>
            </volist>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-2 control-label">咨询内容</label>
        <div class="col-xs-10">
            <textarea name="content" id="content" rows="5" class="form-control"></textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-xs-10">
            <input type="button" id="submit" class="btn btn-primary" value="发表咨询" data-loading="稍候..."> <input class="btn btn-default" type="reset" value="重置">
        </div>
    </div>
</form>
<script>
    $(function(){
        $('#submit').click(function(event){
            event.preventDefault();
            var query=$('#consult_form').serialize();
            query+='&'+$.param({table_name:consult_info.table_name,row_id:consult_info.row_id,goods_uid:consult_info.goods_uid,from_url:consult_info.from_url});
            var action=$('#consult_form').attr('action');
            $.post(action,query,function(msg){
                if(msg.status){
                    $('.close').click();
                    toast.success(msg.info);
                    setTimeout(function(){
                        location.reload();
                    },1500);
                }else{
                    handleAjax(msg);
                }
            },'json');
        });

    });
</script>